A keyboard, as one of input devices for a computer, has entered into people's daily life. Generally, an input device includes keys and key caps which are independent from each other. When using this kind of keyboard to input operation commands, different key caps are tapped to input corresponding key commands. However, since the input device including keys and key caps has a longer key travel, the input device generally has a larger thickness, which does not conform to the modern idea for manufacturing ultra-thin electronic devices.